create excel sheet

Hi all,

while exporting into an existing Excel file I would like to append the data into a new worksheet.

Is there a way to create such a new worksheet in an open excel file before exporting?

thanks in advance.

Karl
kabr - Wed Jan 30 07:55:17 EST 2013

Re: create excel sheet
SystemAdmin - Wed Jan 30 11:09:15 EST 2013

The fantastic "Enhanced Export to Excel" from Galactic Solutions (Michael Sutherland) allows you to select an existing Excel file and also to specify the sheet to export to.

Link: http://www.galactic-solutions.com/downloads/GalacticDownloadExcel.htm

Re: create excel sheet
kabr - Wed Jan 30 11:28:05 EST 2013

SystemAdmin - Wed Jan 30 11:09:15 EST 2013
The fantastic "Enhanced Export to Excel" from Galactic Solutions (Michael Sutherland) allows you to select an existing Excel file and also to specify the sheet to export to.

Link: http://www.galactic-solutions.com/downloads/GalacticDownloadExcel.htm

Well, right, yes.
But you can only specify a sheet that already exists in the workbook.

What I want to do is: export into an existing workbook, but not into one of its sheets, because these already contain data I do not want to overwrite. Therefore I want to create a new worksheet inside the specified workbook and then export into that sheet. And I want to do this from the dxl script.

Karl

Re: create excel sheet
SystemAdmin - Wed Jan 30 12:01:58 EST 2013

kabr - Wed Jan 30 11:28:05 EST 2013
Well, right, yes.
But you can only specify a sheet that already exists in the workbook.

What I want to do is: export into an existing workbook, but not into one of its sheets, because these already contain data I do not want to overwrite. Therefore I want to create a new worksheet inside the specified workbook and then export into that sheet. And I want to do this from the dxl script.

Karl

Hi

If you want to create a new sheet, you can use the add-Method

http://msdn.microsoft.com/de-de/library/microsoft.office.interop.excel.worksheets.add(v=office.11).aspx

Best regards
Wolfgang